{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 项目名称：天音控股公司招聘内容分析\n",
    "## 数据加值宣言：\n",
    "- **本项目产出按热门公司类型及热门招聘行业的挖掘的关于天音控股公司招聘内容的全部数据，以一个比较有代表性的公司为出发点，了解具备特定标签和属性的公司的招聘偏好，从而解决NPS就业需求及特性的就业分析问题。**\n",
    "\n",
    "# 数据最小可用产品\n",
    "- **从一个典型公司出发，深度挖掘此类属性（行业类型，公司类型）等相似的公司可能具备的基本招聘要求（门槛：学历）。**\n",
    "\n",
    "# 挖掘Query参数\n",
    "- 成功爬取了热门公司类型的所有页码\n",
    "- 成功爬取了热门行业的所有页码\n",
    "- 并生成了一个excel，其中包含三个sheet表\n",
    "- 一个比较有代表性的公司为出发点，了解具备特定标签和属性的公司的招聘偏好\n",
    "- **天音控股公司招聘内容（第一张表）主要来解决对这类型公司招聘的基本要求以及招聘偏好的问题**\n",
    "- 第二三张sheet主要为爬取下来的完整数据，其存在是为了提供给19级tableau具体分析\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 基本模块\n",
    "import pandas as pd\n",
    "from requests_html import HTMLSession"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[40, 40, 40, 40, 40, 40, 40, 40, 40]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# A-1   单一页面\n",
    "url = \"https://www.liepin.com/zhaopin/?keyword=PRD\"\n",
    "session = HTMLSession()\n",
    "r = session.get( url )\n",
    "\n",
    "# 先取特定元素, 精准打击其子后辈\n",
    "主要元素 = r.html.xpath( \\\n",
    "    '//ul[@class=\"sojob-list\"]/li')\n",
    "\n",
    "# 预期是一个元素的列表？\n",
    "#print (主要元素[0].xpath('//div[contains(@class,\"sojob-item-main\")]'))\n",
    "#print (主要元素[0].xpath('//div[contains(@class,\"job-info\")]/h3/a'))\n",
    "#print (主要元素[3].xpath('//div[contains(@class,\"job-info\")]/p/a'))\n",
    "#print (主要元素[3].xpath('//div[contains(@class,\"job-info\")]/p/span[@class=\"text-warning\"]'))\n",
    "#print (主要元素[3].xpath('//div[contains(@class,\"job-info\")]/p/span[@class=\"edu\"]/following-sibling::span'))\n",
    "#print (主要元素[3].xpath('//div[contains(@class,\"job-info\")]/p/time/@title'))\n",
    "#print (主要元素[0].xpath('//div[contains(@class,\"sojob-item-main\")]//p[@class=\"company-name\"]/a'))\n",
    "\n",
    "# 作为xpath字典，键为我要抓的牛肉名称，值为xpath\n",
    "dict_xpaths={ \n",
    "    'text': {\n",
    "        'edu':      '//div[contains(@class,\"job-info\")]/p/span[@class=\"edu\"]',\n",
    "        '经验':      '//div[contains(@class,\"job-info\")]/p/span[@class=\"edu\"]/following-sibling::span',\n",
    "        '薪水':    '//div[contains(@class,\"job-info\")]/p/span[@class=\"text-warning\"]', \n",
    "        '时间':    '//div[contains(@class,\"job-info\")]/p/time/@title', \n",
    "        '职称':    '//div[contains(@class,\"job-info\")]/h3/a', \n",
    "        '公司地点': '//div[contains(@class,\"job-info\")]/p/a',\n",
    "        '公司名称': '//div[contains(@class,\"sojob-item-main\")]//p[@class=\"company-name\"]/a', \n",
    "    },\n",
    "    'text_content': {\n",
    "    },\n",
    "    'href': {\n",
    "        '链结':    '//div[contains(@class,\"job-info\")]/h3/a', \n",
    "        '公司URL': '//div[contains(@class,\"sojob-item-main\")]//p[@class=\"company-name\"]/a', \n",
    "    }\n",
    "}\n",
    "\n",
    "def get_e_text_content(_xpath_):\n",
    "    # 高级列表推导\n",
    "    暂存结果 = [e.xpath(_xpath_)[0].lxml.text_content() for e in 主要元素]\n",
    "    return(暂存结果)\n",
    "\n",
    "def get_e_text(_xpath_):\n",
    "    # 高级列表推导\n",
    "    暂存结果 = [\"\".join([x.strip() if type(x) is str else x.text.strip() for x in e.xpath(_xpath_)]) for e in 主要元素]\n",
    "    return(暂存结果)\n",
    "\n",
    "def get_e_href(_xpath_):\n",
    "    # 高级列表推导\n",
    "    暂存结果 = [list(e.xpath(_xpath_, first=True).absolute_links)[0] \\\n",
    "               if len(e.xpath(_xpath_, first=True).absolute_links) >= 1  \\\n",
    "               else \"\" for e in 主要元素]\n",
    "    return(暂存结果)\n",
    "\n",
    "# 只对主要元素下进行.xpath取值\n",
    "数据字典 = dict()\n",
    "\n",
    "数据字典 = {k:get_e_text_content(v) for k,v in dict_xpaths['text_content'].items()}\n",
    "数据字典.update({k:get_e_text(v) for k,v in dict_xpaths['text'].items()})\n",
    "数据字典.update({k:get_e_href(v) for k,v in dict_xpaths['href'].items()})\n",
    "\n",
    "[len(v) for k,v in 数据字典.items()]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[<Element 'div' class=('search-conditions',) data-selector='search-conditions'>]\n",
      "<Element 'div' class=('search-conditions',) data-selector='search-conditions'>\n",
      "[<Element 'dt' class=('search-title',)>, <Element 'dt' class=('search-title',)>, <Element 'dt' class=('search-title',)>, <Element 'dt' class=('search-title',)>, <Element 'dt' class=('search-title',)>]\n",
      "公司：\n",
      "行业：\n",
      "城市：\n",
      "薪资：\n",
      "更多：\n",
      "<Element 'dd' class=('comp-list',)>\n",
      "<Element 'dd' class=('short-dd', 'select-industry') data-param='industries'>\n",
      "<Element 'dd' data-param='city'>\n",
      "<Element 'dd' data-param='salary'>\n",
      "<Element 'dd' class=('dropdown', 'dropdown-time')>\n",
      "<Element 'dd' class=('dropdown', 'dropdown-jobkind')>\n",
      "<Element 'dd' class=('dropdown', 'dropdown-compscale')>\n",
      "<Element 'dd' class=('dropdown', 'dropdown-compkind')>\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'中国500强': '/zhaopin/?init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=155&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df',\n",
       " '2018互联网300强': '/zhaopin/?init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=182&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df',\n",
       " '制造业500强': '/zhaopin/?init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=186&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df',\n",
       " 'AI创新成长50强 ': '/zhaopin/?init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=189&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df',\n",
       " '独角兽': '/zhaopin/?init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=130&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df',\n",
       " '上市公司': '/zhaopin/?init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=156&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df'}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# A-2 扩张 公司 ?  \n",
    "\n",
    "# 先取特定元素, 精准打击其子后辈\n",
    "主要元素 = r.html.xpath('//div[@data-selector=\"search-conditions\"]')\n",
    "# 预期是一个元素的列表？\n",
    "print (主要元素)\n",
    "print (主要元素[0])\n",
    "print (主要元素[0].xpath('//dt[@class=\"search-title\"]'))\n",
    "\n",
    "list_search_title = 主要元素[0].xpath('//dt[@class=\"search-title\"]')\n",
    "for x in list_search_title:\n",
    "    print (x.text)\n",
    "    \n",
    "list_search_dd = 主要元素[0].xpath('//dt[@class=\"search-title\"]/following-sibling::dd')\n",
    "for x in list_search_dd:\n",
    "    print (x)  \n",
    "    \n",
    "\n",
    "公司数据选择器链结 = r.html.xpath('//div[@data-selector=\"search-conditions\"]')[0] \\\n",
    "                    .xpath('//dt[@class=\"search-title\"]/following-sibling::dd')[0] \\\n",
    "                    .xpath('//div[contains(@class,\"hot-comp-tags\")]/a/@href')\n",
    "               \n",
    "公司数据选择器链结\n",
    "\n",
    "# 但我们需要知道这些选择器链结, 对映到什麽数据\n",
    "公司数据选择器链结 = r.html.xpath('//div[@data-selector=\"search-conditions\"]')[0] \\\n",
    "                    .xpath('//dt[@class=\"search-title\"]/following-sibling::dd')[0] \\\n",
    "                    .xpath('//div[contains(@class,\"hot-comp-tags\")]/a')\n",
    "公司数据选择器链结\n",
    "\n",
    "#[ x.xpath(\"a/@href\")[0] for x in 公司数据选择器链结]\n",
    "#[ x.xpath(\"a/text()\")[0] for x in 公司数据选择器链结]\n",
    "公司数据选择器链结 = { x.xpath(\"a/text()\")[0]:x.xpath(\"a/@href\")[0] for x in 公司数据选择器链结}\n",
    "公司数据选择器链结"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=155&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=182&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=186&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=189&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=130&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='init=-1&headckid=229cbb80233e3dbb&flushckid=1&fromSearchBtn=2&keyword=PRD&compTag=156&ckid=229cbb80233e3dbb&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=dc70eacfee00907d1d8d8ad23bc0e2df&d_curPage=0&d_pageSize=40&d_headId=dc70eacfee00907d1d8d8ad23bc0e2df', fragment='')]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# B-1 使用 urllib.parse 解析\n",
    "# 导入解析模块\n",
    "from urllib.parse import urlparse, parse_qs\n",
    "[ urlparse(x) for x in 公司数据选择器链结.values()]  # 字典的值——链接进行解析"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 6 entries, 0 to 5\n",
      "Data columns (total 6 columns):\n",
      " #   Column    Non-Null Count  Dtype \n",
      "---  ------    --------------  ----- \n",
      " 0   scheme    6 non-null      object\n",
      " 1   netloc    6 non-null      object\n",
      " 2   path      6 non-null      object\n",
      " 3   params    6 non-null      object\n",
      " 4   query     6 non-null      object\n",
      " 5   fragment  6 non-null      object\n",
      "dtypes: object(6)\n",
      "memory usage: 416.0+ bytes\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>scheme</th>\n",
       "      <th>netloc</th>\n",
       "      <th>path</th>\n",
       "      <th>params</th>\n",
       "      <th>query</th>\n",
       "      <th>fragment</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>/zhaopin/</td>\n",
       "      <td></td>\n",
       "      <td>init=-1&amp;headckid=229cbb80233e3dbb&amp;flushckid=1&amp;...</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  scheme netloc       path params  \\\n",
       "0                /zhaopin/          \n",
       "\n",
       "                                               query fragment  \n",
       "0  init=-1&headckid=229cbb80233e3dbb&flushckid=1&...           "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# B-2 使用 pd.DataFrame进行 unuinque()相异值计量比对 \n",
    "import pandas as pd\n",
    "df = pd.DataFrame([ urlparse(x) for x in 公司数据选择器链结.values()])  # urlparse 主要是实现链接的六个部分进行拆分的功能\n",
    "df.info() # 查看它的信息：主要是变量 行数 数据类型 \n",
    "df.nunique() # 比较同一个变量下的观察有多少个不同 从而我们判断影响url链接的具体是哪个部分\n",
    "df.head(1) # 取一行看看数据框长什么样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "init             1\n",
      "headckid         1\n",
      "flushckid        1\n",
      "fromSearchBtn    1\n",
      "keyword          1\n",
      "compTag          6\n",
      "ckid             1\n",
      "siTag            1\n",
      "d_sfrom          1\n",
      "d_ckId           1\n",
      "d_curPage        1\n",
      "d_pageSize       1\n",
      "d_headId         1\n",
      "dtype: int64\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>init</th>\n",
       "      <th>headckid</th>\n",
       "      <th>flushckid</th>\n",
       "      <th>fromSearchBtn</th>\n",
       "      <th>keyword</th>\n",
       "      <th>compTag</th>\n",
       "      <th>ckid</th>\n",
       "      <th>siTag</th>\n",
       "      <th>d_sfrom</th>\n",
       "      <th>d_ckId</th>\n",
       "      <th>d_curPage</th>\n",
       "      <th>d_pageSize</th>\n",
       "      <th>d_headId</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-1</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>PRD</td>\n",
       "      <td>155</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw</td>\n",
       "      <td>search_unknown</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "      <td>0</td>\n",
       "      <td>40</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-1</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>PRD</td>\n",
       "      <td>182</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw</td>\n",
       "      <td>search_unknown</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "      <td>0</td>\n",
       "      <td>40</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-1</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>PRD</td>\n",
       "      <td>186</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw</td>\n",
       "      <td>search_unknown</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "      <td>0</td>\n",
       "      <td>40</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-1</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>PRD</td>\n",
       "      <td>189</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw</td>\n",
       "      <td>search_unknown</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "      <td>0</td>\n",
       "      <td>40</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>PRD</td>\n",
       "      <td>130</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw</td>\n",
       "      <td>search_unknown</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "      <td>0</td>\n",
       "      <td>40</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>-1</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>PRD</td>\n",
       "      <td>156</td>\n",
       "      <td>229cbb80233e3dbb</td>\n",
       "      <td>1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw</td>\n",
       "      <td>search_unknown</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "      <td>0</td>\n",
       "      <td>40</td>\n",
       "      <td>dc70eacfee00907d1d8d8ad23bc0e2df</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  init          headckid flushckid fromSearchBtn keyword compTag  \\\n",
       "0   -1  229cbb80233e3dbb         1             2     PRD     155   \n",
       "1   -1  229cbb80233e3dbb         1             2     PRD     182   \n",
       "2   -1  229cbb80233e3dbb         1             2     PRD     186   \n",
       "3   -1  229cbb80233e3dbb         1             2     PRD     189   \n",
       "4   -1  229cbb80233e3dbb         1             2     PRD     130   \n",
       "5   -1  229cbb80233e3dbb         1             2     PRD     156   \n",
       "\n",
       "               ckid                                          siTag  \\\n",
       "0  229cbb80233e3dbb  1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw   \n",
       "1  229cbb80233e3dbb  1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw   \n",
       "2  229cbb80233e3dbb  1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw   \n",
       "3  229cbb80233e3dbb  1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw   \n",
       "4  229cbb80233e3dbb  1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw   \n",
       "5  229cbb80233e3dbb  1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw   \n",
       "\n",
       "          d_sfrom                            d_ckId d_curPage d_pageSize  \\\n",
       "0  search_unknown  dc70eacfee00907d1d8d8ad23bc0e2df         0         40   \n",
       "1  search_unknown  dc70eacfee00907d1d8d8ad23bc0e2df         0         40   \n",
       "2  search_unknown  dc70eacfee00907d1d8d8ad23bc0e2df         0         40   \n",
       "3  search_unknown  dc70eacfee00907d1d8d8ad23bc0e2df         0         40   \n",
       "4  search_unknown  dc70eacfee00907d1d8d8ad23bc0e2df         0         40   \n",
       "5  search_unknown  dc70eacfee00907d1d8d8ad23bc0e2df         0         40   \n",
       "\n",
       "                           d_headId  \n",
       "0  dc70eacfee00907d1d8d8ad23bc0e2df  \n",
       "1  dc70eacfee00907d1d8d8ad23bc0e2df  \n",
       "2  dc70eacfee00907d1d8d8ad23bc0e2df  \n",
       "3  dc70eacfee00907d1d8d8ad23bc0e2df  \n",
       "4  dc70eacfee00907d1d8d8ad23bc0e2df  \n",
       "5  dc70eacfee00907d1d8d8ad23bc0e2df  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# B-3 针对query 再解析之 \n",
    "#df_qs = pd.DataFrame([ parse_qs(x) for x in df['query'] ])\n",
    "# parse_qs把URL字符串解析成了列表，用dict函数或者\"{}\"可以把列表转化为字典\n",
    "df_qs = pd.DataFrame([{k:v[0] for k,v in parse_qs(x).items()} for x in df['query'] ])\n",
    "print (df_qs.nunique())\n",
    "df_qs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['0b0e4d0b94f9739a'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['040'], 'keyword': ['PRD'], 'ckid': ['0b0e4d0b94f9739a'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['c25d7f3a3ffd774483a76d2e00b24508'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['c25d7f3a3ffd774483a76d2e00b24508']}\n",
      "dict_items([('init', ['-1']), ('industryType', ['industry_01']), ('headckid', ['0b0e4d0b94f9739a']), ('flushckid', ['1']), ('fromSearchBtn', ['2']), ('industries', ['040']), ('keyword', ['PRD']), ('ckid', ['0b0e4d0b94f9739a']), ('siTag', ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw']), ('d_sfrom', ['search_unknown']), ('d_ckId', ['c25d7f3a3ffd774483a76d2e00b24508']), ('d_curPage', ['0']), ('d_pageSize', ['40']), ('d_headId', ['c25d7f3a3ffd774483a76d2e00b24508'])])\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'https://www.liepin.com/zhaopin/?keyword': 'PRD'}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 上一步部分代码具体解释部分：\n",
    "# parse_qs把URL字符串解析成了列表，用dict函数或者\"{}\"可以把列表转化为字典\n",
    "# 参考链接：https://blog.csdn.net/weixin_34217711/article/details/92383758\n",
    "import urllib\n",
    "url_ = \"https://www.liepin.com/zhaopin/?subIndustry=&init=-1&industryType=industry_01&headckid=0b0e4d0b94f9739a&flushckid=1&fromSearchBtn=2&industries=040&keyword=PRD&ckid=0b0e4d0b94f9739a&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=c25d7f3a3ffd774483a76d2e00b24508&d_curPage=0&d_pageSize=40&d_headId=c25d7f3a3ffd774483a76d2e00b24508\" \n",
    "parse = urllib.parse.parse_qs(url_)\n",
    "parse = urllib.parse.parse_qs(url_)\n",
    "print(parse) # 经过urllib解析后返回的是一个字典\n",
    "parse = urllib.parse.parse_qs(url_).items()  #  items() 函数以列表返回可遍历的(键, 值) 元组数组\n",
    "print(parse) # 经过.items() 后可以转化为dict_items \n",
    "\n",
    "# 将列表转化为字典  运用了dict函数方法\n",
    "dict([(k,v[0]) for k,v in urllib.parse.parse_qs(url).items()])\n",
    "# v[0] 是取到字典的第0个元素，也就是列表本身"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'init': ['-1'], 'headckid': ['229cbb80233e3dbb'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'keyword': ['PRD'], 'compTag': ['155'], 'ckid': ['229cbb80233e3dbb'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['dc70eacfee00907d1d8d8ad23bc0e2df'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['dc70eacfee00907d1d8d8ad23bc0e2df']}\n",
      "{'中国500强': '155', '2018互联网300强': '182', '制造业500强': '186', 'AI创新成长50强 ': '189', '独角兽': '130', '上市公司': '156'}\n"
     ]
    }
   ],
   "source": [
    "# B-4 建构 参数模板 及 字典_compTag\n",
    "def parse_url_qs_for_compTag (url):\n",
    "    six_parts = urlparse(url) \n",
    "    out = parse_qs(six_parts.query)\n",
    "    return (out)\n",
    "\n",
    "# 把所有的公司链结取到，并转化为列表\n",
    "参数模板 = parse_url_qs_for_compTag(list(公司数据选择器链结.values())[0]) \n",
    "\n",
    "print(参数模板)\n",
    "# 从 out 里面所有热门公司链接的参数中取出'comTag'的key所对应的value\n",
    "# 然后取出里面的第0个元素 也就是整个列表 ，这代表了 参数compTag 的所有值\n",
    "[ parse_url_qs_for_compTag(x)['compTag'][0] for x in 公司数据选择器链结.values()]\n",
    "\n",
    "# 这里对compTag的key和value进行了匹配\n",
    "字典_compTag = { k:parse_url_qs_for_compTag(v)['compTag'][0] for k,v in 公司数据选择器链结.items()}\n",
    "print (字典_compTag)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'中国500强': {'init': ['-1'], 'headckid': ['229cbb80233e3dbb'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'keyword': ['PRD'], 'compTag': ['155'], 'ckid': ['229cbb80233e3dbb'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['dc70eacfee00907d1d8d8ad23bc0e2df'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['dc70eacfee00907d1d8d8ad23bc0e2df']}, '2018互联网300强': {'init': ['-1'], 'headckid': ['229cbb80233e3dbb'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'keyword': ['PRD'], 'compTag': ['155'], 'ckid': ['229cbb80233e3dbb'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['dc70eacfee00907d1d8d8ad23bc0e2df'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['dc70eacfee00907d1d8d8ad23bc0e2df']}, '制造业500强': {'init': ['-1'], 'headckid': ['229cbb80233e3dbb'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'keyword': ['PRD'], 'compTag': ['155'], 'ckid': ['229cbb80233e3dbb'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['dc70eacfee00907d1d8d8ad23bc0e2df'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['dc70eacfee00907d1d8d8ad23bc0e2df']}, 'AI创新成长50强 ': {'init': ['-1'], 'headckid': ['229cbb80233e3dbb'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'keyword': ['PRD'], 'compTag': ['155'], 'ckid': ['229cbb80233e3dbb'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['dc70eacfee00907d1d8d8ad23bc0e2df'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['dc70eacfee00907d1d8d8ad23bc0e2df']}, '独角兽': {'init': ['-1'], 'headckid': ['229cbb80233e3dbb'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'keyword': ['PRD'], 'compTag': ['155'], 'ckid': ['229cbb80233e3dbb'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['dc70eacfee00907d1d8d8ad23bc0e2df'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['dc70eacfee00907d1d8d8ad23bc0e2df']}, '上市公司': {'init': ['-1'], 'headckid': ['229cbb80233e3dbb'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'keyword': ['PRD'], 'compTag': ['155'], 'ckid': ['229cbb80233e3dbb'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['dc70eacfee00907d1d8d8ad23bc0e2df'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['dc70eacfee00907d1d8d8ad23bc0e2df']}}\n"
     ]
    }
   ],
   "source": [
    "# B-5 建构 参数模板  \n",
    "def 参数模板生成(compTag , keyword ):\n",
    "    参数 = 参数模板.copy() # 这里的参数取得了所有的热门公司的链接，呈现的形式是字典\n",
    "    \n",
    "    # 把 取到的value 赋值给comTag \n",
    "    compTag =  参数['compTag'] \n",
    "    keyword =  参数['keyword'] \n",
    "    return (参数)\n",
    "\n",
    "参数_compTag_用户体验 = { k:参数模板生成(compTag = [v], keyword = ['用户体验']) for k,v in 字典_compTag.items()}\n",
    "print(参数_compTag_用户体验)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "# C-2  简化 A-1   单一页面爬+解析\n",
    "session = HTMLSession()\n",
    "\n",
    "def requests_liepin( url, params):\n",
    "    r = session.get( url , params = payload)\n",
    "\n",
    "    # 先取特定元素, 精准打击其子后辈\n",
    "    主要元素 = r.html.xpath( '//ul[@class=\"sojob-list\"]/li')\n",
    "\n",
    "    # 作为xpath字典，键为我要抓的牛肉名称，值为xpath\n",
    "    dict_xpaths={ \n",
    "        'text': {\n",
    "            'edu':      '//div[contains(@class,\"job-info\")]/p/span[@class=\"edu\"]',\n",
    "            '经验':      '//div[contains(@class,\"job-info\")]/p/span[@class=\"edu\"]/following-sibling::span',\n",
    "            '薪水':    '//div[contains(@class,\"job-info\")]/p/span[@class=\"text-warning\"]', \n",
    "            '时间':    '//div[contains(@class,\"job-info\")]/p/time/@title', \n",
    "            '职称':    '//div[contains(@class,\"job-info\")]/h3/a', \n",
    "            '公司地点': '//div[contains(@class,\"job-info\")]/p/a',\n",
    "            '公司名称': '//div[contains(@class,\"sojob-item-main\")]//p[@class=\"company-name\"]/a', \n",
    "        },\n",
    "        'text_content': {\n",
    "        },\n",
    "        'href': {\n",
    "            '链结':    '//div[contains(@class,\"job-info\")]/h3/a', \n",
    "            '公司URL': '//div[contains(@class,\"sojob-item-main\")]//p[@class=\"company-name\"]/a', \n",
    "        }\n",
    "    }\n",
    "\n",
    "    def get_e_text_content(_xpath_):\n",
    "        # 高级列表推导\n",
    "        暂存结果 = [e.xpath(_xpath_)[0].lxml.text_content() for e in 主要元素]\n",
    "        return(暂存结果)\n",
    "\n",
    "    def get_e_text(_xpath_):\n",
    "        # 高级列表推导\n",
    "        暂存结果 = [\"\".join([x.strip() if type(x) is str else x.text.strip() for x in e.xpath(_xpath_)]) for e in 主要元素]\n",
    "        return(暂存结果)\n",
    "\n",
    "    def get_e_href(_xpath_):\n",
    "        # 高级列表推导\n",
    "        暂存结果 = [list(e.xpath(_xpath_, first=True).absolute_links)[0] \\\n",
    "                   if len(e.xpath(_xpath_, first=True).absolute_links) >= 1  \\\n",
    "                   else \"\" for e in 主要元素]\n",
    "        return(暂存结果)\n",
    "\n",
    "    # 只对主要元素下进行.xpath取值\n",
    "    数据字典 = dict()\n",
    "\n",
    "    数据字典 = {k:get_e_text_content(v) for k,v in dict_xpaths['text_content'].items()}\n",
    "    数据字典.update({k:get_e_text(v) for k,v in dict_xpaths['text'].items()})\n",
    "    数据字典.update({k:get_e_href(v) for k,v in dict_xpaths['href'].items()})\n",
    "\n",
    "    数据 = pd.DataFrame(数据字典)\n",
    "    #数据.to_excel(\"20春_Web数据挖掘_week03_liepin.xlsx\", sheet_name=\"搜查结果\")\n",
    "    return (数据)\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>edu</th>\n",
       "      <th>经验</th>\n",
       "      <th>薪水</th>\n",
       "      <th>时间</th>\n",
       "      <th>职称</th>\n",
       "      <th>公司地点</th>\n",
       "      <th>公司名称</th>\n",
       "      <th>链结</th>\n",
       "      <th>公司URL</th>\n",
       "      <th>热门公司类型</th>\n",
       "      <th>curPage</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>中国500强</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>统招本科</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>面议</td>\n",
       "      <td>2020年04月25日</td>\n",
       "      <td>频道运维岗</td>\n",
       "      <td>济南-高新区</td>\n",
       "      <td>中国重型汽车集团有限公司</td>\n",
       "      <td>https://www.liepin.com/job/1927756245.shtml</td>\n",
       "      <td>https://www.liepin.com/company/9739005/</td>\n",
       "      <td>中国500强</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>统招本科</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>面议</td>\n",
       "      <td>2020年04月25日</td>\n",
       "      <td>播音主持岗</td>\n",
       "      <td>济南-高新区</td>\n",
       "      <td>中国重型汽车集团有限公司</td>\n",
       "      <td>https://www.liepin.com/job/1927756189.shtml</td>\n",
       "      <td>https://www.liepin.com/company/9739005/</td>\n",
       "      <td>中国500强</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>统招本科</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>面议</td>\n",
       "      <td>2020年04月25日</td>\n",
       "      <td>后期制作岗</td>\n",
       "      <td>济南-高新区</td>\n",
       "      <td>中国重型汽车集团有限公司</td>\n",
       "      <td>https://www.liepin.com/job/1927756135.shtml</td>\n",
       "      <td>https://www.liepin.com/company/9739005/</td>\n",
       "      <td>中国500强</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>统招本科</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>面议</td>\n",
       "      <td>2020年04月25日</td>\n",
       "      <td>摄像记者岗</td>\n",
       "      <td>济南-高新区</td>\n",
       "      <td>中国重型汽车集团有限公司</td>\n",
       "      <td>https://www.liepin.com/job/1927755771.shtml</td>\n",
       "      <td>https://www.liepin.com/company/9739005/</td>\n",
       "      <td>中国500强</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>大专及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>13-25k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>影像光学高级工程师</td>\n",
       "      <td>南昌-高新区</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>https://www.liepin.com/job/1927790641.shtml</td>\n",
       "      <td>https://www.liepin.com/company/856576/</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>学历不限</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>面议</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>创新事业群UC事业部-高级产品专家-健康医疗方向</td>\n",
       "      <td>杭州</td>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>https://www.liepin.com/job/1927790635.shtml</td>\n",
       "      <td>https://www.liepin.com/company/1072424/</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>大专及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>13-25k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>影像结构高级工程师</td>\n",
       "      <td>南昌-高新区</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>https://www.liepin.com/job/1927790621.shtml</td>\n",
       "      <td>https://www.liepin.com/company/856576/</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>大专及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>13-25k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>影像电子高级工程师</td>\n",
       "      <td>南昌-高新区</td>\n",
       "      <td>欧菲光</td>\n",
       "      <td>https://www.liepin.com/job/1927790595.shtml</td>\n",
       "      <td>https://www.liepin.com/company/856576/</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>学历不限</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>面议</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>集团客户体验事业部-产品专家-客户体验中台-体验中台&amp;商家产品</td>\n",
       "      <td>杭州</td>\n",
       "      <td>阿里巴巴</td>\n",
       "      <td>https://www.liepin.com/job/1927790477.shtml</td>\n",
       "      <td>https://www.liepin.com/company/1072424/</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2400 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      edu     经验          薪水           时间                               职称  \\\n",
       "0   本科及以上  5-10年  20-30k·12薪  2020年04月26日                          建筑结构工程师   \n",
       "1    统招本科   1-3年          面议  2020年04月25日                            频道运维岗   \n",
       "2    统招本科   1-3年          面议  2020年04月25日                            播音主持岗   \n",
       "3    统招本科   1-3年          面议  2020年04月25日                            后期制作岗   \n",
       "4    统招本科   1-3年          面议  2020年04月25日                            摄像记者岗   \n",
       "..    ...    ...         ...          ...                              ...   \n",
       "35  大专及以上  5-10年  13-25k·12薪  2020年04月26日                        影像光学高级工程师   \n",
       "36   学历不限   3-5年          面议  2020年04月26日         创新事业群UC事业部-高级产品专家-健康医疗方向   \n",
       "37  大专及以上  5-10年  13-25k·12薪  2020年04月26日                        影像结构高级工程师   \n",
       "38  大专及以上  5-10年  13-25k·12薪  2020年04月26日                        影像电子高级工程师   \n",
       "39   学历不限  5-10年          面议  2020年04月26日  集团客户体验事业部-产品专家-客户体验中台-体验中台&商家产品   \n",
       "\n",
       "      公司地点          公司名称                                           链结  \\\n",
       "0   深圳-南山区          天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "1   济南-高新区  中国重型汽车集团有限公司  https://www.liepin.com/job/1927756245.shtml   \n",
       "2   济南-高新区  中国重型汽车集团有限公司  https://www.liepin.com/job/1927756189.shtml   \n",
       "3   济南-高新区  中国重型汽车集团有限公司  https://www.liepin.com/job/1927756135.shtml   \n",
       "4   济南-高新区  中国重型汽车集团有限公司  https://www.liepin.com/job/1927755771.shtml   \n",
       "..     ...           ...                                          ...   \n",
       "35  南昌-高新区           欧菲光  https://www.liepin.com/job/1927790641.shtml   \n",
       "36      杭州          阿里巴巴  https://www.liepin.com/job/1927790635.shtml   \n",
       "37  南昌-高新区           欧菲光  https://www.liepin.com/job/1927790621.shtml   \n",
       "38  南昌-高新区           欧菲光  https://www.liepin.com/job/1927790595.shtml   \n",
       "39      杭州          阿里巴巴  https://www.liepin.com/job/1927790477.shtml   \n",
       "\n",
       "                                      公司URL  热门公司类型  curPage  \n",
       "0   https://www.liepin.com/company/7954048/  中国500强        0  \n",
       "1   https://www.liepin.com/company/9739005/  中国500强        0  \n",
       "2   https://www.liepin.com/company/9739005/  中国500强        0  \n",
       "3   https://www.liepin.com/company/9739005/  中国500强        0  \n",
       "4   https://www.liepin.com/company/9739005/  中国500强        0  \n",
       "..                                      ...     ...      ...  \n",
       "35   https://www.liepin.com/company/856576/    上市公司        9  \n",
       "36  https://www.liepin.com/company/1072424/    上市公司        9  \n",
       "37   https://www.liepin.com/company/856576/    上市公司        9  \n",
       "38   https://www.liepin.com/company/856576/    上市公司        9  \n",
       "39  https://www.liepin.com/company/1072424/    上市公司        9  \n",
       "\n",
       "[2400 rows x 11 columns]"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# C-3   多个页面\n",
    "url = \"https://www.liepin.com/zhaopin/\"\n",
    "\n",
    "list_df = list()\n",
    "for i in range(0,10):\n",
    "    for k,v in 参数_compTag_用户体验.items():\n",
    "        payload = v\n",
    "        df = requests_liepin( url, params = payload)\n",
    "        df = df.assign (热门公司类型 = k)   \n",
    "        df = df.assign (curPage = i)\n",
    "        list_df.append(df)\n",
    "\n",
    "df_all_1 = pd.concat(list_df)\n",
    "df_all_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "writer=pd.ExcelWriter('猎聘热门公司类型.xlsx')\n",
    "df_all_1.to_excel(writer,sheet_name='汇总')\n",
    "writer.save()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'互联网/电商': '/zhaopin/?subIndustry=&init=-1&industryType=industry_01&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=040&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '游戏产业': '/zhaopin/?subIndustry=&init=-1&industryType=industry_01&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=420&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '计算机软件': '/zhaopin/?subIndustry=&init=-1&industryType=industry_01&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=010&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " 'IT服务': '/zhaopin/?subIndustry=&init=-1&industryType=industry_01&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=030&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '电子/芯片/半导体': '/zhaopin/?subIndustry=&init=-1&industryType=industry_02&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=050&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '通信业': '/zhaopin/?subIndustry=&init=-1&industryType=industry_02&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=060&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '计算机/网络设备': '/zhaopin/?subIndustry=&init=-1&industryType=industry_02&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=020&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '房地产/建筑': '/zhaopin/?subIndustry=&init=-1&industryType=industry_03&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=080&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '规划/设计/装潢': '/zhaopin/?subIndustry=&init=-1&industryType=industry_03&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=100&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '房地产服务': '/zhaopin/?subIndustry=&init=-1&industryType=industry_03&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=090&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '银行': '/zhaopin/?subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=130&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '保险': '/zhaopin/?subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=140&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '基金/证券/投资': '/zhaopin/?subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=150&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '会计/审计': '/zhaopin/?subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=430&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '信托/担保/拍卖': '/zhaopin/?subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=500&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '快消品': '/zhaopin/?subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=190&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '批发零售': '/zhaopin/?subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=240&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '服装纺织': '/zhaopin/?subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=200&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '家具/家电': '/zhaopin/?subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=210&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '办公设备': '/zhaopin/?subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=220&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '奢侈品/收藏品': '/zhaopin/?subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=460&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '珠宝/玩具/工艺品': '/zhaopin/?subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=470&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '汽车/摩托车': '/zhaopin/?subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=350&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '机械/机电/重工': '/zhaopin/?subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=360&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '印刷/包装/造纸': '/zhaopin/?subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=180&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '原材料加工': '/zhaopin/?subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=370&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '仪器/电气/自动化': '/zhaopin/?subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=340&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '制药/生物工程': '/zhaopin/?subIndustry=&init=-1&industryType=industry_10&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=270&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '医疗/保健/美容': '/zhaopin/?subIndustry=&init=-1&industryType=industry_10&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=280&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '医疗器械': '/zhaopin/?subIndustry=&init=-1&industryType=industry_10&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=290&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '能源/水利': '/zhaopin/?subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=330&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '石油/化工': '/zhaopin/?subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=310&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '采掘/冶炼/矿产': '/zhaopin/?subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=320&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '环保': '/zhaopin/?subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=300&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '新能源': '/zhaopin/?subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=490&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '专业服务': '/zhaopin/?subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=120&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '中介服务': '/zhaopin/?subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=110&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '外包服务': '/zhaopin/?subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=440&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '检测/认证': '/zhaopin/?subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=450&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '餐饮/酒旅/服务': '/zhaopin/?subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=230&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '文体娱乐': '/zhaopin/?subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=260&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '租赁服务': '/zhaopin/?subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=510&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '广告/市场/会展': '/zhaopin/?subIndustry=&init=-1&industryType=industry_08&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=070&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '影视文化': '/zhaopin/?subIndustry=&init=-1&industryType=industry_08&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=170&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '教育培训': '/zhaopin/?subIndustry=&init=-1&industryType=industry_08&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=380&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '交通/物流/运输': '/zhaopin/?subIndustry=&init=-1&industryType=industry_09&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=250&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '贸易/进出口': '/zhaopin/?subIndustry=&init=-1&industryType=industry_09&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=160&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '航空/航天': '/zhaopin/?subIndustry=&init=-1&industryType=industry_09&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=480&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '政务/公共服务': '/zhaopin/?subIndustry=&init=-1&industryType=industry_12&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=390&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '农林牧渔': '/zhaopin/?subIndustry=&init=-1&industryType=industry_12&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=410&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290',\n",
       " '其他行业': '/zhaopin/?subIndustry=&init=-1&industryType=industry_12&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=400&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290'}"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "### 4.1 行业 \n",
    "# 单一页面\n",
    "url = \"https://www.liepin.com/zhaopin/?keyword=PRD\"\n",
    "session = HTMLSession()\n",
    "r = session.get( url )\n",
    "\n",
    "# 先取特定元素, 精准打击其子后辈\n",
    "主要元素 = r.html.xpath('//div[@data-selector=\"search-conditions\"]')\n",
    "\n",
    "\n",
    "公司数据选择器链结 = r.html.xpath('//div[@data-selector=\"search-conditions\"]')[0] \\\n",
    "                    .xpath('//dt[@class=\"search-title\"]/following-sibling::dd')[1] \\\n",
    "                    .xpath('//div[@class=\"sub-industry\"]/a/@href')\n",
    "#                     .xpath('//div[contains(@class,\"hot-comp-tags\")]/a/@href')\n",
    "               # following-sibling::dd 表示当前节点的兄弟节点中的所有dd标签\n",
    "公司数据选择器链结\n",
    "\n",
    "# 但我们需要知道这些选择器链结, 对映到什麽数据\n",
    "公司数据选择器链结 = r.html.xpath('//div[@data-selector=\"search-conditions\"]')[0] \\\n",
    "                    .xpath('//dt[@class=\"search-title\"]/following-sibling::dd')[1] \\\n",
    "                    .xpath('//div[@class=\"sub-industry\"]/a')\n",
    "公司数据选择器链结\n",
    "\n",
    "# #[ x.xpath(\"a/@href\")[0] for x in 公司数据选择器链结]\n",
    "# #[ x.xpath(\"a/text()\")[0] for x in 公司数据选择器链结]\n",
    "公司数据选择器链结 = { x.xpath(\"a/text()\")[0]:x.xpath(\"a/@href\")[0] for x in 公司数据选择器链结}\n",
    "公司数据选择器链结"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_01&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=040&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_01&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=420&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_01&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=010&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_01&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=030&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_02&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=050&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_02&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=060&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_02&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=020&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_03&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=080&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_03&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=100&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_03&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=090&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=130&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=140&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=150&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=430&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_04&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=500&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=190&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=240&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=200&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=210&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=220&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=460&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_05&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=470&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=350&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=360&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=180&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=370&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_06&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=340&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_10&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=270&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_10&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=280&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_10&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=290&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=330&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=310&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=320&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=300&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_11&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=490&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=120&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=110&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=440&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=450&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=230&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=260&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_07&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=510&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_08&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=070&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_08&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=170&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_08&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=380&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_09&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=250&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_09&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=160&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_09&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=480&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_12&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=390&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_12&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=410&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment=''),\n",
       " ParseResult(scheme='', netloc='', path='/zhaopin/', params='', query='subIndustry=&init=-1&industryType=industry_12&headckid=766ab1896c6ec573&flushckid=1&fromSearchBtn=2&industries=400&keyword=PRD&ckid=766ab1896c6ec573&siTag=1B2M2Y8AsgTpgAmY7PhCfg%7EfA9rXquZc5IkJpXC-Ycixw&d_sfrom=search_unknown&d_ckId=9da875b2b5be87dad1ae327b6afc1290&d_curPage=0&d_pageSize=40&d_headId=9da875b2b5be87dad1ae327b6afc1290', fragment='')]"
      ]
     },
     "execution_count": 95,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用 urllib.parse 解析\n",
    "from urllib.parse import urlparse, parse_qs\n",
    "[ urlparse(x) for x in 公司数据选择器链结.values()]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 51 entries, 0 to 50\n",
      "Data columns (total 6 columns):\n",
      " #   Column    Non-Null Count  Dtype \n",
      "---  ------    --------------  ----- \n",
      " 0   scheme    51 non-null     object\n",
      " 1   netloc    51 non-null     object\n",
      " 2   path      51 non-null     object\n",
      " 3   params    51 non-null     object\n",
      " 4   query     51 non-null     object\n",
      " 5   fragment  51 non-null     object\n",
      "dtypes: object(6)\n",
      "memory usage: 2.5+ KB\n",
      "scheme       1\n",
      "netloc       1\n",
      "path         1\n",
      "params       1\n",
      "query       51\n",
      "fragment     1\n",
      "dtype: int64\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>scheme</th>\n",
       "      <th>netloc</th>\n",
       "      <th>path</th>\n",
       "      <th>params</th>\n",
       "      <th>query</th>\n",
       "      <th>fragment</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>/zhaopin/</td>\n",
       "      <td></td>\n",
       "      <td>subIndustry=&amp;init=-1&amp;industryType=industry_01&amp;...</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  scheme netloc       path params  \\\n",
       "0                /zhaopin/          \n",
       "\n",
       "                                               query fragment  \n",
       "0  subIndustry=&init=-1&industryType=industry_01&...           "
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 使用 pd.DataFrame进行 unuinque()相异值计量比对 \n",
    "import pandas as pd\n",
    "df = pd.DataFrame([ urlparse(x) for x in 公司数据选择器链结.values()])\n",
    "df.info()\n",
    "print(df.nunique())\n",
    "df.head(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "init              1\n",
      "industryType     12\n",
      "headckid          1\n",
      "flushckid         1\n",
      "fromSearchBtn     1\n",
      "industries       51\n",
      "keyword           1\n",
      "ckid              1\n",
      "siTag             1\n",
      "d_sfrom           1\n",
      "d_ckId            1\n",
      "d_curPage         1\n",
      "d_pageSize        1\n",
      "d_headId          1\n",
      "dtype: int64\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>keyword</th>\n",
       "      <th>industries</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>PRD</td>\n",
       "      <td>040</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>PRD</td>\n",
       "      <td>420</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>PRD</td>\n",
       "      <td>010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>PRD</td>\n",
       "      <td>030</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>PRD</td>\n",
       "      <td>050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>PRD</td>\n",
       "      <td>060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>PRD</td>\n",
       "      <td>020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>PRD</td>\n",
       "      <td>080</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>PRD</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>PRD</td>\n",
       "      <td>090</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>PRD</td>\n",
       "      <td>130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>PRD</td>\n",
       "      <td>140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>PRD</td>\n",
       "      <td>150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>PRD</td>\n",
       "      <td>430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>PRD</td>\n",
       "      <td>500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>PRD</td>\n",
       "      <td>190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>PRD</td>\n",
       "      <td>240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>PRD</td>\n",
       "      <td>200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>PRD</td>\n",
       "      <td>210</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>PRD</td>\n",
       "      <td>220</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>PRD</td>\n",
       "      <td>460</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>PRD</td>\n",
       "      <td>470</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>PRD</td>\n",
       "      <td>350</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>PRD</td>\n",
       "      <td>360</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>PRD</td>\n",
       "      <td>180</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>PRD</td>\n",
       "      <td>370</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>PRD</td>\n",
       "      <td>340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>PRD</td>\n",
       "      <td>270</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>PRD</td>\n",
       "      <td>280</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>PRD</td>\n",
       "      <td>290</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>PRD</td>\n",
       "      <td>330</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>PRD</td>\n",
       "      <td>310</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>PRD</td>\n",
       "      <td>320</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>PRD</td>\n",
       "      <td>300</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>PRD</td>\n",
       "      <td>490</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>PRD</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>PRD</td>\n",
       "      <td>110</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>PRD</td>\n",
       "      <td>440</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>PRD</td>\n",
       "      <td>450</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>PRD</td>\n",
       "      <td>230</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>PRD</td>\n",
       "      <td>260</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>PRD</td>\n",
       "      <td>510</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>PRD</td>\n",
       "      <td>070</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>PRD</td>\n",
       "      <td>170</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>PRD</td>\n",
       "      <td>380</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>PRD</td>\n",
       "      <td>250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>PRD</td>\n",
       "      <td>160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>PRD</td>\n",
       "      <td>480</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>PRD</td>\n",
       "      <td>390</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>PRD</td>\n",
       "      <td>410</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>PRD</td>\n",
       "      <td>400</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   keyword industries\n",
       "0      PRD        040\n",
       "1      PRD        420\n",
       "2      PRD        010\n",
       "3      PRD        030\n",
       "4      PRD        050\n",
       "5      PRD        060\n",
       "6      PRD        020\n",
       "7      PRD        080\n",
       "8      PRD        100\n",
       "9      PRD        090\n",
       "10     PRD        130\n",
       "11     PRD        140\n",
       "12     PRD        150\n",
       "13     PRD        430\n",
       "14     PRD        500\n",
       "15     PRD        190\n",
       "16     PRD        240\n",
       "17     PRD        200\n",
       "18     PRD        210\n",
       "19     PRD        220\n",
       "20     PRD        460\n",
       "21     PRD        470\n",
       "22     PRD        350\n",
       "23     PRD        360\n",
       "24     PRD        180\n",
       "25     PRD        370\n",
       "26     PRD        340\n",
       "27     PRD        270\n",
       "28     PRD        280\n",
       "29     PRD        290\n",
       "30     PRD        330\n",
       "31     PRD        310\n",
       "32     PRD        320\n",
       "33     PRD        300\n",
       "34     PRD        490\n",
       "35     PRD        120\n",
       "36     PRD        110\n",
       "37     PRD        440\n",
       "38     PRD        450\n",
       "39     PRD        230\n",
       "40     PRD        260\n",
       "41     PRD        510\n",
       "42     PRD        070\n",
       "43     PRD        170\n",
       "44     PRD        380\n",
       "45     PRD        250\n",
       "46     PRD        160\n",
       "47     PRD        480\n",
       "48     PRD        390\n",
       "49     PRD        410\n",
       "50     PRD        400"
      ]
     },
     "execution_count": 97,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 针对query 再解析之 \n",
    "#df_qs = pd.DataFrame([ parse_qs(x) for x in df['query'] ])\n",
    "df_qs = pd.DataFrame([{k:v[0] for k,v in parse_qs(x).items()} for x in df['query'] ])\n",
    "print (df_qs.nunique())\n",
    "df_qs.head()\n",
    "df_qs[['keyword','industries']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'init': '-1',\n",
       "  'industryType': 'industry_01',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '040',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_01',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '420',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_01',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '010',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_01',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '030',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_02',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '050',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_02',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '060',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_02',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '020',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_03',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '080',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_03',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '100',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_03',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '090',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_04',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '130',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_04',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '140',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_04',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '150',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_04',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '430',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_04',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '500',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_05',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '190',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_05',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '240',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_05',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '200',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_05',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '210',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_05',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '220',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_05',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '460',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_05',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '470',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_06',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '350',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_06',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '360',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_06',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '180',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_06',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '370',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_06',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '340',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_10',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '270',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_10',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '280',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_10',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '290',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_11',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '330',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_11',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '310',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_11',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '320',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_11',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '300',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_11',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '490',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_07',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '120',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_07',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '110',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_07',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '440',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_07',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '450',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_07',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '230',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_07',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '260',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_07',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '510',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_08',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '070',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_08',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '170',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_08',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '380',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_09',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '250',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_09',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '160',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_09',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '480',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_12',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '390',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_12',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '410',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'},\n",
       " {'init': '-1',\n",
       "  'industryType': 'industry_12',\n",
       "  'headckid': '766ab1896c6ec573',\n",
       "  'flushckid': '1',\n",
       "  'fromSearchBtn': '2',\n",
       "  'industries': '400',\n",
       "  'keyword': 'PRD',\n",
       "  'ckid': '766ab1896c6ec573',\n",
       "  'siTag': '1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw',\n",
       "  'd_sfrom': 'search_unknown',\n",
       "  'd_ckId': '9da875b2b5be87dad1ae327b6afc1290',\n",
       "  'd_curPage': '0',\n",
       "  'd_pageSize': '40',\n",
       "  'd_headId': '9da875b2b5be87dad1ae327b6afc1290'}]"
      ]
     },
     "execution_count": 98,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "列表暂存 = [] # list()\n",
    "for x in df['query']: \n",
    "    列表暂存.append({k:v[0] for k,v in parse_qs(x).items()} )\n",
    "列表暂存"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['040'], 'keyword': ['PRD'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290']}\n",
      "{'互联网/电商': '040', '游戏产业': '420', '计算机软件': '010', 'IT服务': '030', '电子/芯片/半导体': '050', '通信业': '060', '计算机/网络设备': '020', '房地产/建筑': '080', '规划/设计/装潢': '100', '房地产服务': '090', '银行': '130', '保险': '140', '基金/证券/投资': '150', '会计/审计': '430', '信托/担保/拍卖': '500', '快消品': '190', '批发零售': '240', '服装纺织': '200', '家具/家电': '210', '办公设备': '220', '奢侈品/收藏品': '460', '珠宝/玩具/工艺品': '470', '汽车/摩托车': '350', '机械/机电/重工': '360', '印刷/包装/造纸': '180', '原材料加工': '370', '仪器/电气/自动化': '340', '制药/生物工程': '270', '医疗/保健/美容': '280', '医疗器械': '290', '能源/水利': '330', '石油/化工': '310', '采掘/冶炼/矿产': '320', '环保': '300', '新能源': '490', '专业服务': '120', '中介服务': '110', '外包服务': '440', '检测/认证': '450', '餐饮/酒旅/服务': '230', '文体娱乐': '260', '租赁服务': '510', '广告/市场/会展': '070', '影视文化': '170', '教育培训': '380', '交通/物流/运输': '250', '贸易/进出口': '160', '航空/航天': '480', '政务/公共服务': '390', '农林牧渔': '410', '其他行业': '400'}\n"
     ]
    }
   ],
   "source": [
    "# B-4 建构 参数模板 及 字典_industries\n",
    "def parse_url_qs_for_industries (url):\n",
    "    six_parts = urlparse(url) \n",
    "    out = parse_qs(six_parts.query)\n",
    "    return (out)\n",
    "\n",
    "# parse_url_qs_for_industries(list(公司数据选择器链结.values())[0])['compTag']\n",
    "参数模板 = parse_url_qs_for_industries(list(公司数据选择器链结.values())[0])\n",
    "print(参数模板)\n",
    "# [ parse_url_qs_for_industries(x)['industries'] for x in 公司数据选择器链结.values()]\n",
    "[ parse_url_qs_for_compTag(x)['industries'][0] for x in 公司数据选择器链结.values()]\n",
    "\n",
    "字典_industries = { k:parse_url_qs_for_industries(v)['industries'][0] for k,v in 公司数据选择器链结.items()}\n",
    "print (字典_industries)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'互联网/电商': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['040'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '游戏产业': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['420'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '计算机软件': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['010'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, 'IT服务': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['030'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '电子/芯片/半导体': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['050'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '通信业': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['060'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '计算机/网络设备': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['020'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '房地产/建筑': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['080'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '规划/设计/装潢': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['100'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '房地产服务': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['090'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '银行': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['130'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '保险': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['140'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '基金/证券/投资': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['150'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '会计/审计': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['430'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '信托/担保/拍卖': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['500'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '快消品': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['190'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '批发零售': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['240'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '服装纺织': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['200'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '家具/家电': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['210'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '办公设备': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['220'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '奢侈品/收藏品': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['460'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '珠宝/玩具/工艺品': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['470'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '汽车/摩托车': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['350'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '机械/机电/重工': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['360'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '印刷/包装/造纸': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['180'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '原材料加工': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['370'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '仪器/电气/自动化': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['340'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '制药/生物工程': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['270'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '医疗/保健/美容': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['280'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '医疗器械': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['290'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '能源/水利': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['330'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '石油/化工': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['310'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '采掘/冶炼/矿产': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['320'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '环保': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['300'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '新能源': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['490'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '专业服务': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['120'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '中介服务': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['110'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '外包服务': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['440'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '检测/认证': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['450'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '餐饮/酒旅/服务': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['230'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '文体娱乐': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['260'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '租赁服务': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['510'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '广告/市场/会展': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['070'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '影视文化': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['170'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '教育培训': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['380'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '交通/物流/运输': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['250'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '贸易/进出口': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['160'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '航空/航天': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['480'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '政务/公共服务': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['390'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '农林牧渔': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['410'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}, '其他行业': {'init': ['-1'], 'industryType': ['industry_01'], 'headckid': ['766ab1896c6ec573'], 'flushckid': ['1'], 'fromSearchBtn': ['2'], 'industries': ['400'], 'keyword': ['用户体验'], 'ckid': ['766ab1896c6ec573'], 'siTag': ['1B2M2Y8AsgTpgAmY7PhCfg~fA9rXquZc5IkJpXC-Ycixw'], 'd_sfrom': ['search_unknown'], 'd_ckId': ['9da875b2b5be87dad1ae327b6afc1290'], 'd_curPage': ['0'], 'd_pageSize': ['40'], 'd_headId': ['9da875b2b5be87dad1ae327b6afc1290'], 'curPage': [9]}}"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "def 参数模板生成(industries,keyword,curPage):\n",
    "    参数 = 参数模板.copy()\n",
    "    参数['industries'] = industries\n",
    "    参数['keyword'] = keyword\n",
    "    参数['curPage'] = curPage\n",
    "    return (参数)\n",
    "\n",
    "参数_industries_用户体验 = {k:参数模板生成(curPage=[i],industries = [v], keyword = ['用户体验']) for k,v in 字典_industries.items()}\n",
    "print(参数_industries_用户体验)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://safe.liepin.com/inspect/authorize?sourceUrl=aHR0cHM6Ly93d3cubGllcGluLmNvbS96aGFvcGluLz9pbml0PS0xJmluZHVzdHJ5VHlwZT1pbmR1c3RyeV8wMSZoZWFkY2tpZD03NjZhYjE4OTZjNmVjNTczJmZsdXNoY2tpZD0xJmZyb21TZWFyY2hCdG49MiZpbmR1c3RyaWVzPTEzMCZrZXl3b3JkPSVFNyU5NCVBOCVFNiU4OCVCNyVFNCVCRCU5MyVFOSVBQSU4QyZja2lkPTc2NmFiMTg5NmM2ZWM1NzMmc2lUYWc9MUIyTTJZOEFzZ1RwZ0FtWTdQaENmZ35mQTlyWHF1WmM1SWtKcFhDLVljaXh3JmRfc2Zyb209c2VhcmNoX3Vua25vd24mZF9ja0lkPTlkYTg3NWIyYjViZTg3ZGFkMWFlMzI3YjZhZmMxMjkwJmRfY3VyUGFnZT0wJmRfcGFnZVNpemU9NDAmZF9oZWFkSWQ9OWRhODc1YjJiNWJlODdkYWQxYWUzMjdiNmFmYzEyOTAmY3VyUGFnZT05&__xxx=ZmxhZzEwMDAxfGlwX1VuaXF1ZUtleToyMTAuMjEuNzkuMjQ1OnxpcF91YToyMTAuMjEuNzkuMjQ1Ok1vemlsbGEvNS4wIChNYWNpbnRvc2g7IEludGVsIE1hYyBPUyBYIDEwXzEyXzYpIEFwcGxlV2ViS2l0LzYwMy4zLjggKEtIVE1MLCBsaWtlIEdlY2tvKSBWZXJzaW9uLzEwLjEuMiBTYWZhcmkvNjAzLjMuOHxVbmlxdWVLZXk6fF9lX2xkX2F1dGhfOnxfaF9sZF9hdXRoXzp8MjEwLjIxLjc5LjI0NQ%3D%3D'"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 多个页面准备测试1 银行\n",
    "url = \"https://www.liepin.com/zhaopin/\"\n",
    "session = HTMLSession()\n",
    "payload = 参数_industries_用户体验['银行']\n",
    "r = session.get( url, params = payload)\n",
    "r.url"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [],
   "source": [
    "session = HTMLSession()\n",
    "\n",
    "def requests_liepin( url, params):\n",
    "    r = session.get( url , params = payload)\n",
    "\n",
    "    # 先取特定元素, 精准打击其子后辈\n",
    "    主要元素 = r.html.xpath( '//ul[@class=\"sojob-list\"]/li')\n",
    "\n",
    "    # 作为xpath字典，键为我要抓的牛肉名称，值为xpath\n",
    "    dict_xpaths={ \n",
    "        'text': {\n",
    "            'edu':      '//div[contains(@class,\"job-info\")]/p/span[@class=\"edu\"]',\n",
    "            '经验':      '//div[contains(@class,\"job-info\")]/p/span[@class=\"edu\"]/following-sibling::span',\n",
    "            '薪水':    '//div[contains(@class,\"job-info\")]/p/span[@class=\"text-warning\"]', \n",
    "            '时间':    '//div[contains(@class,\"job-info\")]/p/time/@title', \n",
    "            '职称':    '//div[contains(@class,\"job-info\")]/h3/a', \n",
    "            '公司地点': '//div[contains(@class,\"job-info\")]/p/a',\n",
    "            '公司名称': '//div[contains(@class,\"sojob-item-main\")]//p[@class=\"company-name\"]/a', \n",
    "        },\n",
    "        'text_content': {\n",
    "        },\n",
    "        'href': {\n",
    "            '链结':    '//div[contains(@class,\"job-info\")]/h3/a', \n",
    "            '公司URL': '//div[contains(@class,\"sojob-item-main\")]//p[@class=\"company-name\"]/a', \n",
    "        }\n",
    "    }\n",
    "\n",
    "    def get_e_text_content(_xpath_):\n",
    "        # 高级列表推导\n",
    "        暂存结果 = [e.xpath(_xpath_)[0].lxml.text_content() for e in 主要元素]\n",
    "        return(暂存结果)\n",
    "\n",
    "    def get_e_text(_xpath_):\n",
    "        # 高级列表推导\n",
    "        暂存结果 = [\"\".join([x.strip() if type(x) is str else x.text.strip() for x in e.xpath(_xpath_)]) for e in 主要元素]\n",
    "        return(暂存结果)\n",
    "\n",
    "    def get_e_href(_xpath_):\n",
    "        # 高级列表推导\n",
    "        暂存结果 = [list(e.xpath(_xpath_, first=True).absolute_links)[0] \\\n",
    "                   if len(e.xpath(_xpath_, first=True).absolute_links) >= 1  \\\n",
    "                   else \"\" for e in 主要元素]\n",
    "        return(暂存结果)\n",
    "\n",
    "    # 只对主要元素下进行.xpath取值\n",
    "    数据字典 = dict()\n",
    "\n",
    "    数据字典 = {k:get_e_text_content(v) for k,v in dict_xpaths['text_content'].items()}\n",
    "    数据字典.update({k:get_e_text(v) for k,v in dict_xpaths['text'].items()})\n",
    "    数据字典.update({k:get_e_href(v) for k,v in dict_xpaths['href'].items()})\n",
    "\n",
    "    数据 = pd.DataFrame(数据字典)\n",
    "    #数据.to_excel(\"20春_Web数据挖掘_week03_liepin.xlsx\", sheet_name=\"搜查结果\")\n",
    "    return (数据)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>edu</th>\n",
       "      <th>经验</th>\n",
       "      <th>薪水</th>\n",
       "      <th>时间</th>\n",
       "      <th>职称</th>\n",
       "      <th>公司地点</th>\n",
       "      <th>公司名称</th>\n",
       "      <th>链结</th>\n",
       "      <th>公司URL</th>\n",
       "      <th>行业名称</th>\n",
       "      <th>industries</th>\n",
       "      <th>curPage</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>学历不限</td>\n",
       "      <td>经验不限</td>\n",
       "      <td>10-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>直播媒介</td>\n",
       "      <td>北京</td>\n",
       "      <td>钱方好近</td>\n",
       "      <td>https://www.liepin.com/job/1927781015.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7863496/</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>1-3年</td>\n",
       "      <td>面议</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>国际销售（J10390)</td>\n",
       "      <td>上海-浦东新区</td>\n",
       "      <td>西域供应链</td>\n",
       "      <td>https://www.liepin.com/job/1927779263.shtml</td>\n",
       "      <td>https://www.liepin.com/company/8396469/</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>15-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>独立站站长</td>\n",
       "      <td>杭州-西溪</td>\n",
       "      <td>新兔科技</td>\n",
       "      <td>https://www.liepin.com/job/1927778439.shtml</td>\n",
       "      <td>https://www.liepin.com/company/10100579/</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>50-80k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>产品总监</td>\n",
       "      <td></td>\n",
       "      <td>敦煌网</td>\n",
       "      <td>https://www.liepin.com/job/1927774223.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7862497/</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>12-18k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>南通城市经理</td>\n",
       "      <td>南通-崇川区</td>\n",
       "      <td>爱回收</td>\n",
       "      <td>https://www.liepin.com/job/1927773439.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7868039/</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>互联网/电商</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>10-18k·12薪</td>\n",
       "      <td>2020年04月18日</td>\n",
       "      <td>商品经理-乐园-广州文旅城(J53082)</td>\n",
       "      <td>广州-花都区</td>\n",
       "      <td>广州融创文旅城</td>\n",
       "      <td>https://www.liepin.com/job/1927494597.shtml</td>\n",
       "      <td>https://www.liepin.com/company/10023943/</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>15-20k·12薪</td>\n",
       "      <td>2020年04月16日</td>\n",
       "      <td>企划总监</td>\n",
       "      <td>新余</td>\n",
       "      <td>新余市罗福置业有限公司</td>\n",
       "      <td>https://www.liepin.com/job/1927495321.shtml</td>\n",
       "      <td>https://www.liepin.com/company/9510270/</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>大专及以上</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>8-10k·12薪</td>\n",
       "      <td>2020年04月15日</td>\n",
       "      <td>投拓岗</td>\n",
       "      <td>驻马店-驿城区</td>\n",
       "      <td>同信地产集团有限公司</td>\n",
       "      <td>https://www.liepin.com/job/1927446631.shtml</td>\n",
       "      <td>https://www.liepin.com/company/10140283/</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>大专及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>8-10k·12薪</td>\n",
       "      <td>2020年04月07日</td>\n",
       "      <td>工程部经理</td>\n",
       "      <td>新余</td>\n",
       "      <td>新余市罗福置业有限公司</td>\n",
       "      <td>https://www.liepin.com/job/1926522813.shtml</td>\n",
       "      <td>https://www.liepin.com/company/9510270/</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>大专及以上</td>\n",
       "      <td>10年以上</td>\n",
       "      <td>15-40k·12薪</td>\n",
       "      <td>2020年04月07日</td>\n",
       "      <td>工程总经理</td>\n",
       "      <td>新余</td>\n",
       "      <td>新余市罗福置业有限公司</td>\n",
       "      <td>https://www.liepin.com/job/1926290393.shtml</td>\n",
       "      <td>https://www.liepin.com/company/9510270/</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>房地产服务</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8560 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      edu     经验          薪水           时间                     职称     公司地点  \\\n",
       "0    学历不限   经验不限  10-30k·12薪  2020年04月26日                   直播媒介       北京   \n",
       "1   本科及以上   1-3年          面议  2020年04月26日           国际销售（J10390)  上海-浦东新区   \n",
       "2   本科及以上  5-10年  15-30k·12薪  2020年04月26日                  独立站站长    杭州-西溪   \n",
       "3   本科及以上  5-10年  50-80k·12薪  2020年04月26日                   产品总监            \n",
       "4   本科及以上   3-5年  12-18k·12薪  2020年04月26日                 南通城市经理   南通-崇川区   \n",
       "..    ...    ...         ...          ...                    ...      ...   \n",
       "35  本科及以上  5-10年  10-18k·12薪  2020年04月18日  商品经理-乐园-广州文旅城(J53082)   广州-花都区   \n",
       "36  本科及以上  5-10年  15-20k·12薪  2020年04月16日                   企划总监       新余   \n",
       "37  大专及以上   3-5年   8-10k·12薪  2020年04月15日                    投拓岗  驻马店-驿城区   \n",
       "38  大专及以上  5-10年   8-10k·12薪  2020年04月07日                  工程部经理       新余   \n",
       "39  大专及以上  10年以上  15-40k·12薪  2020年04月07日                  工程总经理       新余   \n",
       "\n",
       "           公司名称                                           链结  \\\n",
       "0          钱方好近  https://www.liepin.com/job/1927781015.shtml   \n",
       "1         西域供应链  https://www.liepin.com/job/1927779263.shtml   \n",
       "2          新兔科技  https://www.liepin.com/job/1927778439.shtml   \n",
       "3           敦煌网  https://www.liepin.com/job/1927774223.shtml   \n",
       "4           爱回收  https://www.liepin.com/job/1927773439.shtml   \n",
       "..          ...                                          ...   \n",
       "35      广州融创文旅城  https://www.liepin.com/job/1927494597.shtml   \n",
       "36  新余市罗福置业有限公司  https://www.liepin.com/job/1927495321.shtml   \n",
       "37   同信地产集团有限公司  https://www.liepin.com/job/1927446631.shtml   \n",
       "38  新余市罗福置业有限公司  https://www.liepin.com/job/1926522813.shtml   \n",
       "39  新余市罗福置业有限公司  https://www.liepin.com/job/1926290393.shtml   \n",
       "\n",
       "                                       公司URL    行业名称 industries  curPage  \n",
       "0    https://www.liepin.com/company/7863496/  互联网/电商     互联网/电商        0  \n",
       "1    https://www.liepin.com/company/8396469/  互联网/电商     互联网/电商        0  \n",
       "2   https://www.liepin.com/company/10100579/  互联网/电商     互联网/电商        0  \n",
       "3    https://www.liepin.com/company/7862497/  互联网/电商     互联网/电商        0  \n",
       "4    https://www.liepin.com/company/7868039/  互联网/电商     互联网/电商        0  \n",
       "..                                       ...     ...        ...      ...  \n",
       "35  https://www.liepin.com/company/10023943/   房地产服务      房地产服务        4  \n",
       "36   https://www.liepin.com/company/9510270/   房地产服务      房地产服务        4  \n",
       "37  https://www.liepin.com/company/10140283/   房地产服务      房地产服务        4  \n",
       "38   https://www.liepin.com/company/9510270/   房地产服务      房地产服务        4  \n",
       "39   https://www.liepin.com/company/9510270/   房地产服务      房地产服务        4  \n",
       "\n",
       "[8560 rows x 12 columns]"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 多个页面\n",
    "url = \"https://www.liepin.com/zhaopin/\"\n",
    "\n",
    "list_df = list()\n",
    "for i in range(0,10):\n",
    "    for k,v in 参数_industries_用户体验.items():\n",
    "        payload = v\n",
    "        df = requests_liepin( url, params = payload)\n",
    "        df = df.assign (行业名称 = k) \n",
    "        df = df.assign (industries = k)\n",
    "        df = df.assign (curPage = i)\n",
    "        list_df.append(df)\n",
    "\n",
    "df_all_2 = pd.concat(list_df)\n",
    "df_all_2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "metadata": {},
   "outputs": [],
   "source": [
    "writer=pd.ExcelWriter('猎聘热门行业.xlsx')\n",
    "df_all_2.to_excel(writer,sheet_name='汇总')\n",
    "writer.save()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>edu</th>\n",
       "      <th>经验</th>\n",
       "      <th>薪水</th>\n",
       "      <th>时间</th>\n",
       "      <th>职称</th>\n",
       "      <th>公司地点</th>\n",
       "      <th>公司名称</th>\n",
       "      <th>链结</th>\n",
       "      <th>公司URL</th>\n",
       "      <th>热门公司类型</th>\n",
       "      <th>curPage</th>\n",
       "      <th>行业名称</th>\n",
       "      <th>industries</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>中国500强</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>2018互联网300强</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>制造业500强</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>AI创新成长50强</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>独角兽</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>289</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>2018互联网300强</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>290</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>制造业500强</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>291</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>AI创新成长50强</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>292</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>独角兽</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>293</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>天音控股</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>294 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       edu     经验          薪水           时间       职称    公司地点  公司名称  \\\n",
       "0    本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "1    本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "2    本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "3    本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "4    本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "..     ...    ...         ...          ...      ...     ...   ...   \n",
       "289  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "290  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "291  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "292  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "293  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区  天音控股   \n",
       "\n",
       "                                              链结  \\\n",
       "0    https://www.liepin.com/job/1926991259.shtml   \n",
       "1    https://www.liepin.com/job/1926991259.shtml   \n",
       "2    https://www.liepin.com/job/1926991259.shtml   \n",
       "3    https://www.liepin.com/job/1926991259.shtml   \n",
       "4    https://www.liepin.com/job/1926991259.shtml   \n",
       "..                                           ...   \n",
       "289  https://www.liepin.com/job/1926991259.shtml   \n",
       "290  https://www.liepin.com/job/1926991259.shtml   \n",
       "291  https://www.liepin.com/job/1926991259.shtml   \n",
       "292  https://www.liepin.com/job/1926991259.shtml   \n",
       "293  https://www.liepin.com/job/1926991259.shtml   \n",
       "\n",
       "                                       公司URL       热门公司类型  curPage 行业名称  \\\n",
       "0    https://www.liepin.com/company/7954048/       中国500强        0  通信业   \n",
       "1    https://www.liepin.com/company/7954048/  2018互联网300强        0  通信业   \n",
       "2    https://www.liepin.com/company/7954048/      制造业500强        0  通信业   \n",
       "3    https://www.liepin.com/company/7954048/   AI创新成长50强         0  通信业   \n",
       "4    https://www.liepin.com/company/7954048/          独角兽        0  通信业   \n",
       "..                                       ...          ...      ...  ...   \n",
       "289  https://www.liepin.com/company/7954048/  2018互联网300强        4  通信业   \n",
       "290  https://www.liepin.com/company/7954048/      制造业500强        4  通信业   \n",
       "291  https://www.liepin.com/company/7954048/   AI创新成长50强         4  通信业   \n",
       "292  https://www.liepin.com/company/7954048/          独角兽        4  通信业   \n",
       "293  https://www.liepin.com/company/7954048/         上市公司        4  通信业   \n",
       "\n",
       "    industries  \n",
       "0          通信业  \n",
       "1          通信业  \n",
       "2          通信业  \n",
       "3          通信业  \n",
       "4          通信业  \n",
       "..         ...  \n",
       "289        通信业  \n",
       "290        通信业  \n",
       "291        通信业  \n",
       "292        通信业  \n",
       "293        通信业  \n",
       "\n",
       "[294 rows x 13 columns]"
      ]
     },
     "execution_count": 159,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_all = df_all_1.merge(df_all_2)\n",
    "df_all"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>学历要求</th>\n",
       "      <th>经验</th>\n",
       "      <th>薪水</th>\n",
       "      <th>时间</th>\n",
       "      <th>职称</th>\n",
       "      <th>公司地点</th>\n",
       "      <th>链结</th>\n",
       "      <th>公司URL</th>\n",
       "      <th>页码</th>\n",
       "      <th>行业</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>热门公司类型</th>\n",
       "      <th>行业名称</th>\n",
       "      <th>公司名称</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>中国500强</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018互联网300强</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业500强</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>AI创新成长50强</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>独角兽</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>0</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018互联网300强</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业500强</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>AI创新成长50强</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>独角兽</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上市公司</th>\n",
       "      <th>通信业</th>\n",
       "      <th>天音控股</th>\n",
       "      <td>本科及以上</td>\n",
       "      <td>5-10年</td>\n",
       "      <td>20-30k·12薪</td>\n",
       "      <td>2020年04月26日</td>\n",
       "      <td>建筑结构工程师</td>\n",
       "      <td>深圳-南山区</td>\n",
       "      <td>https://www.liepin.com/job/1926991259.shtml</td>\n",
       "      <td>https://www.liepin.com/company/7954048/</td>\n",
       "      <td>4</td>\n",
       "      <td>通信业</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>294 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                        学历要求     经验          薪水           时间       职称    公司地点  \\\n",
       "热门公司类型      行业名称 公司名称                                                           \n",
       "中国500强      通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "2018互联网300强 通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "制造业500强     通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "AI创新成长50强   通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "独角兽         通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "...                      ...    ...         ...          ...      ...     ...   \n",
       "2018互联网300强 通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "制造业500强     通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "AI创新成长50强   通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "独角兽         通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "上市公司        通信业  天音控股  本科及以上  5-10年  20-30k·12薪  2020年04月26日  建筑结构工程师  深圳-南山区   \n",
       "\n",
       "                                                                链结  \\\n",
       "热门公司类型      行业名称 公司名称                                                \n",
       "中国500强      通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "2018互联网300强 通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "制造业500强     通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "AI创新成长50强   通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "独角兽         通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "...                                                            ...   \n",
       "2018互联网300强 通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "制造业500强     通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "AI创新成长50强   通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "独角兽         通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "上市公司        通信业  天音控股  https://www.liepin.com/job/1926991259.shtml   \n",
       "\n",
       "                                                         公司URL  页码   行业  \n",
       "热门公司类型      行业名称 公司名称                                                    \n",
       "中国500强      通信业  天音控股  https://www.liepin.com/company/7954048/   0  通信业  \n",
       "2018互联网300强 通信业  天音控股  https://www.liepin.com/company/7954048/   0  通信业  \n",
       "制造业500强     通信业  天音控股  https://www.liepin.com/company/7954048/   0  通信业  \n",
       "AI创新成长50强   通信业  天音控股  https://www.liepin.com/company/7954048/   0  通信业  \n",
       "独角兽         通信业  天音控股  https://www.liepin.com/company/7954048/   0  通信业  \n",
       "...                                                        ...  ..  ...  \n",
       "2018互联网300强 通信业  天音控股  https://www.liepin.com/company/7954048/   4  通信业  \n",
       "制造业500强     通信业  天音控股  https://www.liepin.com/company/7954048/   4  通信业  \n",
       "AI创新成长50强   通信业  天音控股  https://www.liepin.com/company/7954048/   4  通信业  \n",
       "独角兽         通信业  天音控股  https://www.liepin.com/company/7954048/   4  通信业  \n",
       "上市公司        通信业  天音控股  https://www.liepin.com/company/7954048/   4  通信业  \n",
       "\n",
       "[294 rows x 10 columns]"
      ]
     },
     "execution_count": 165,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_all = df_all.rename(columns={\"curPage\":\"页码\",\"industries\":\"行业\",\"edu\":\"学历要求\"})\n",
    "df_all = df_all.set_index([\"热门公司类型\",\"行业名称\",\"公司名称\"])\n",
    "df_all"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_all.to_excel(\"天音控股公司的招聘内容.xlsx\", sheet_name=\"搜查结果\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "749px",
    "left": "1125.609375px",
    "top": "110px",
    "width": "281.383px"
   },
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
